<div class="weui-tabbar">
    <a href="{:U(MODULE_NAME.'/index/createContractOrder')}" class="weui-tabbar__item weui-bar__item_on" check="car">
      <div class="weui-tabbar__icon">
        <img src="__PRIVATE__/images/小车车1.png" alt="">
      </div>
      <p class="weui-tabbar__label">首页</p>
    </a>
    
    <a href="{:U(MODULE_NAME.'/personal/index')}" class="weui-tabbar__item" check="my">
      <div class="weui-tabbar__icon">
        <img src="__PRIVATE__/images/我的.png" alt="">
      </div>
      <p class="weui-tabbar__label">我的</p>
    </a>
</div>
<script type="text/javascript" class="tabbar js_show">
    $(function(){
        var navLi=$('a'); //此处填写你的导航html对象
        var windowUrl=window.location.href; //获取当前url链接
        navLi.each(function(){
            var t = 'http://bookcar.fancon.com' + $(this).attr('href');
            if(t==windowUrl){
                $(this).addClass('weui-bar__item_on').siblings('.weui-bar__item_on').removeClass('weui-bar__item_on');
            	
                if("{$Think.CONTROLLER_NAME}" =="Index"){
                	$(this).children('.weui-tabbar__icon').children('img').attr('src','__PRIVATE__/images/小车车1.png');
                	$(this).siblings('a').children('.weui-tabbar__icon').children('img').attr('src','__PRIVATE__/images/我的.png');
                }else if("{$Think.CONTROLLER_NAME}" =="Personal"){
                	$(this).children('.weui-tabbar__icon').children('img').attr('src','__PRIVATE__/images/我的1.png');
                	$(this).siblings('a').children('.weui-tabbar__icon').children('img').attr('src','__PRIVATE__/images/小车车.png');
                }
            }
        });
        
        /* $('.weui-tabbar__item').on('click', function () {
        $(this).addClass('weui-bar__item_on').siblings('.weui-bar__item_on').removeClass('weui-bar__item_on');
        if($(this).attr('check') == 'car'){
        	$(this).children('.weui-tabbar__icon').children('img').attr('src','__PRIVATE__/images/小车车1.png');
        	$(this).siblings('a').children('.weui-tabbar__icon').children('img').attr('src','__PRIVATE__/images/我的.png');
        }else{
        	$(this).children('.weui-tabbar__icon').children('img').attr('src','__PRIVATE__/images/我的1.png');
        	$(this).siblings('a').children('.weui-tabbar__icon').children('img').attr('src','__PRIVATE__/images/小车车.png');
        }
    }); */
    });
</script>
